//-----------------------------------------------------------------------
// <copyright file="a_CatMainService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_CatMainService
    {
        #region a_CatMain

        public static void Createa_CatMain(a_CatMain a_CatMain)
        {            
            try
            {
                a_CatMainDAO a_CatMainDAO = new a_CatMainDAO();
                a_CatMainDAO.Createa_CatMain(a_CatMain);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_CatMain(a_CatMain a_CatMain)
        {            
            try
            {
                a_CatMainDAO a_CatMainDAO = new a_CatMainDAO();
                a_CatMainDAO.Updatea_CatMain(a_CatMain);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_CatMain(int catID)
        {            
            try
            {
                a_CatMainDAO a_CatMainDAO = new a_CatMainDAO();
                a_CatMainDAO.Deletea_CatMain(catID);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_CatMain Geta_CatMain(int catID)
        {            
            try
            {
                a_CatMainDAO a_CatMainDAO = new a_CatMainDAO();
                return a_CatMainDAO.Geta_CatMain(catID);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_CatMainCollection Geta_CatMainList(a_CatMainColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_CatMainDAO a_CatMainDAO = new a_CatMainDAO();
                return a_CatMainDAO.Geta_CatMainList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_CatMainCollection Geta_CatMainList(a_CatMainColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_CatMainDAO a_CatMainDAO = new a_CatMainDAO();
                return a_CatMainDAO.Geta_CatMainList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion

        #region Ngoc
        public static a_CatMainCollection Geta_CatMainListByGroup(int groupId)
        {
            try
            {
                a_CatMainDAO a_CatMainDAO = new a_CatMainDAO();
                return a_CatMainDAO.Geta_CatMainListByGroup(groupId);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }  
        #endregion     
    }
}